home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
telecomm
/
bbsxdemo.lzh
/
UTILS.SIG
/
TIM_LIM.LZH
/
TIM_LIM.SCR
Wrap
Text File
|
1992-09-05
|
5KB
|
148 lines
SCRIPT
; ---------------------------------------------------------------
;
; FILE NAME: TIM_LIM.SCR
; DATE 4 September 1992
; VERSION: 1.00
; BY: R. Sanchez, C&R Systems
; PURPOSE: Sample Script file showing one use of the
; TIME_LIMIT Script Command.
;
; ---------------------------------------------------------------
; ----------- COPYRIGHT 1992, R. SANCHEZ, C&R SYSTEMS -----------
; ---------------------------------------------------------------
;
; 1. Example of one use of the TIME_LIMIT Script Command.
;
; 2. Allow a user to do specific functions and not have their
; time limit remaining reduced. We do not actually prevent
; their time limit from being reduced, we keep track of what
; their time limit was at the beginning of a Script, and at the
; end, we set it back with the TIME_LIMIT Script Command.
;
; ---------------------------------------------------------------
; Define variables. Those variables which take values of the
; Ampersand variables are established by using the SET
; command rather than by the "DEFINE Variable = &nn". Some
; variables assigned in this manner require that the Script
; File be compiled.
DEFINE Minutes_to_hold ;
SET Minutes_to_hold = &33 ; Minutes remaining right now
; Just to show what the time related variables are set to.
PRINTE 'Time limit per call: &13'
PRINTE 'Time limit per day: &14'
PRINTE 'Minutes on today: &15'
PRINTE 'Minutes connected: &32'
PRINTE 'Minutes remaining : &33'
PRINTE 'System Time: &34'
PRINTE
PRINTE 'Press Control C when you wish to abort.'
PRINTE 'Minutes remaining will be set as shown above.'
PRINTE
PRINTE ' TIME Minutes remaining'
PRINTE '-------- -----------------'
; ---------------------------------------------------------------
; Goto the label Set_time_ when the user presses "Control C"
; or "Control X".
ABORT Set_time_
DEFINE New_Minutes_remaining
DEFINE Delay
Do_it_again_:
; Just a delay loop
FOR Delay = 1 to 50
ENDFOR
; Get the user's current remaining minutes allowed on this
; call.
SET New_Minutes_remaining = &33
; Some formatting for our display. Set the variable string
; to four characters in length.
EXPAND (New_Minutes_remaining, 4)
; Erase the line of printed text...
BACKSPACE (21)
; ...Write a new line in its place.
PRINT '&34 [New_Minutes_remaining]'
; Delay the printed line long enough so we can see it.
FOR Delay = 1 to 1500
ENDFOR
; Just some more formatting, overwrite the line with
; something else so that it is obvious that something is
; happening.
BACKSPACE (21)
PRINT '*********************'
; Just keep looping forever until an abort is sensed by the
; ABORT Set_time_ and then goto Set_time_:
GOTO Do_it_again_
; ---------------------------------------------------------------
; Aborted was sensed, now to do the actual setting of the
; users Time Limit.
Set_time_:
; The main point of this Script program. To allow a user to
; do specific functions and not have their time limit
; remaining reduced.
DEFINE Time_limit_to_hold = 0
DEFINE Current_minutes_connected
; The users "TIME_LIMIT" for purposes of performing these
; tasks can be considered to be their "Minutes Remaining"
; (variable &33) plus their "Minutes Connected" (variable
; &32).
;
; We initially set the variable Minutes_to_hold the value of
; the &33 variable to keep track of the users original
; minutes remaining. We add that to the Time_limit_to_hold
; variable.
;
; We then take the "Current_minutes_connected" variable and
; also add that to the Time_limit_to_hold variable.
;
; We use the INCREASE variable (variable) command to do the
; adding. We end up with the value contained in the
; Time_limit_to_hold variable holding the amount of time
; needed to be used with the "TIME_LIMIT" command.
; Get how long they have been connected.
SET Current_minutes_connected = &32
INCREASE Time_limit_to_hold (Minutes_to_hold)
INCREASE Time_limit_to_hold (Current_minutes_connected)
TIME_LIMIT (Time_limit_to_hold)
PRINTE
PRINTE 'Minutes remaining has been set to &33'
; ---------------------------------------------------------------
; Just a habit...
EOF:
DEFAULT_PATH
EXIT
; ---------------------------------------------------------------